﻿using Authority.Model;
using System.Collections.Generic;
using Tool.Model;

namespace Authority.Logic
{
    /// <summary>
    /// 管理员管理接口
    /// </summary>
    public interface ISysUserService
    {
        #region 密码重置操作
        /// <summary>
        /// 发布短信请求
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<int> ForgetPswSendMessage(string parameters);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<int> ResetPassword(UserForgetPswRequest inputInfo);
        #endregion

        #region 用户登录
        /// <summary>
        /// 获取验证码
        /// </summary>
        /// <returns></returns>
        ResultFileContent LoadValidateCode();

        /// <summary>
        /// 用户登录
        /// </summary>
        ResultJsonInfo<SysUserInfo> UserLogin(LoginRequest inputInfo);
        #endregion

        #region 个人信息功能
        /// <summary>
        /// 根据登录账号获取信息
        /// </summary>
        /// <param name="loginName"></param>
        /// <returns></returns>
        ResultJsonInfo<SysUserEntity> LoadUserByLoginName(string loginName);

        /// <summary>
        /// 上传团购图片（后期把图片上传统一处理）
        /// </summary>
        /// <param name="parametersInfo"></param>
        /// <returns></returns>
        ResultJsonInfo<string> UploadImage(string filePath, Dictionary<string, object> inputInfo);

        /// <summary>
        /// 保存用户信息
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<SysUserEntity> SaveUserInfo(UserInfoModifyRequest inputInfo);

        /// <summary>
        /// 确认用户修改密码
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<bool> SaveChangePwd(UserPswModifyRequest inputInfo);
        #endregion

        #region 用户管理功能
        /// <summary>
        /// 分页获取用户列表
        /// </summary>
        /// <param name="inputInfo"></param>
        /// <returns></returns>
        ResultJsonInfo<List<View_SysUserEntity>> LoadSysUserList(ParametersInfo<UserInfoQueryRequest> inputInfo);

        /// <summary>
        /// 添加保存信息
        /// </summary>
        /// <returns></returns>
        ResultJsonInfo<int> AddInfo(UserAddRequest inputInfo);

        /// <summary>
        /// 编辑保存信息
        /// </summary>
        /// <returns></returns>
        ResultJsonInfo<int> ModifyInfo(UserModifyRequest inputInfo);

        /// <summary>
        /// 删除信息
        /// </summary>
        /// <param name="gCodeList"></param>
        /// <returns></returns>
        ResultJsonInfo<int> Remove(List<string> gCodeList);

        #endregion
    }
}
